package ace.cmp.core.enums;

import lombok.Getter;

/**
 * @author Caspar 系统代码枚举
 */
public enum SystemCodeEnum implements BaseEnum<Integer> {
  SUCCESS(0, "成功"),
  BUSINESS_EXCEPTION(-1, "系统异常"),
  ERROR_CHECK_PARAMETER(10100, "参数校验失败"),
  ERROR_INVALID_PARAMETER(10110, "请求参数无效"),
  ERROR_CLIENT_ABORT_EXCEPTION(499, "客户端已关闭"),
  ERROR_SYSTEM_EXCEPTION(500, "系统异常"),
  ERROR_HTTP_403_EXCEPTION(403, "权限不足,禁止访问"),
  ERROR_HTTP_404_EXCEPTION(404, "接口不存在"),
  ;
  @Getter private Integer code;
  @Getter private String desc;

  SystemCodeEnum(Integer code, String desc) {

    this.code = code;
    this.desc = desc;
  }
}
